<template>
	<view class="content">
		<TabNavigation style="width: 100%;" :title="title" :tabs="tabs"></TabNavigation>
		<card-box style="width: 100%;" :header="header">
			<view slot="main" class="content-card-main">
				<view class="main_card">
					<view class="card" v-for="(item,index) in cardImgList" :key="index">
						<image :src="item.url"></image>
						<view class="title">
							{{item.title}}
						</view>
						<view class="bottom">
							<text>
								{{item.number}}
							</text>
							{{item.unit}}
						</view>
					</view>
				</view>

				<view class="main_banner">
					<image src="/static/bnc56tt.png"></image>
					<view class="number">
						11
					</view>
				</view>


				<c-table :headerData="headerData" :tableData="tableData">
					<template v-slot:unitName="{data}">
						<view class="font unitName">
							{{data.unitName}}
						</view>
					</template>
					<template v-slot:rzrs="{data}">
						<view class="font statistics">
							{{data.rzrs}}件
						</view>
					</template>
				</c-table>

			</view>
		</card-box>


		<card-box style="width: 100%;" :header="'议案动态'" :type="'2'" type2T="搜索议案">
			<view slot="main" class="content-card-main">
				<c-table :headerData="headerData2" :tableData="tableData2">
					<template v-slot:unitName="{data}">
						<view class="font unitName">
							{{data.unitName}}
						</view>
					</template>
					<template v-slot:controls="{data}">
						<view class="font controls" @click="lookView">
							{{data.controls}}
						</view>
					</template>
				</c-table>
				<view class="table_footer">
					展开 <text class="triangle"></text>
				</view>

			</view>
		</card-box>



		<card-box style="width: 100%;" :header="'建议涉及分类'">
			<view slot="main" class="content-card-main">
				<view class="wordCloud-warp_main">
					<wordCloud :data="wordCloud">
					</wordCloud>
				</view>
				<customBar :data="barList" :barStyle="barStyle"></customBar>
				<view class="table_footer">
					展开 <text class="triangle"></text>
				</view>

			</view>
		</card-box>

		<card-box style="width: 100%;" :header="'重点督办建议'">
			<view slot="main" class="content-card-main">
				<c-table :headerData="headerData3" :tableData="tableData3" :border="true">

					<template v-slot:index="{data}">
						<view class="font index" @click="lookView">
							{{data.index}}
						</view>
					</template>
					<template v-slot:indext="{data}">
						<view class="font indext" @click="lookView">
							{{data.indext}}
						</view>
					</template>
					<template v-slot:indexThree="{data}">
						<view class="font indexThree" @click="lookView">
							{{data.indexThree}}
						</view>
					</template>
					<template v-slot:index4="{data}">
						<view class="font index4" @click="lookView">
							{{data.index4}}
						</view>
					</template>
				</c-table>
				<view class="table_footer">
					展开 <text class="triangle"></text>
				</view>

			</view>
		</card-box>
		<card-box style="width: 100%;" :header="'交办单位承办情况'">
			<view slot="main" class="content-card-main">
				<view class="main_card main_card_b">
					<view class="card" v-for="(item,index) in card4ImgList" :key="index">
						<image :src="item.url"></image>
						<view class="title" style="left:40rpx;color: #363636;">
							{{item.title}}
						</view>
						<view class="bottom" :style="`left:40rpx;color: ${item.unitColor};`">
							<text :style="`color: ${item.color};`">
								{{item.number}}
							</text>
							{{item.unit}}
						</view>
					</view>
				</view>
			</view>
		</card-box>


	</view>



</template>

<script>
	import TabNavigation from '@/components/TabNavigation.vue'
	import cardbox from '@/components/card/cardbox.vue'
	import cTable from '@/components/cTable/cTable.vue'
	import wordCloud from '@/components/wordCloud.vue'
	import customBar from '@/components/customBar.vue'
	export default {
		components: {
			TabNavigation,
			wordCloud,
			customBar,
			"card-box": cardbox,
			"c-table": cTable
		},
		data() {
			return {
				header: "统计信息",
				title: '议案建议工作视窗',
				tabs: [{
						name: '大会期间'
					}, {
						name: '闭会期间'
					},
					{
						name: 'show',
						disabled: true
					}, {
						name: 'show',
						disabled: true
					},
				],
				headerData: [{
						width: 30,
						align: 'left',
						name: '待处理议案建议',
						value: 'unitName',
						solt: 'unitName'
					},
					{
						width: 20,
						align: 'left',
						name: '统计数据',
						value: 'rzrs',
						solt: 'rzrs'
					},

				],
				tableData: [{
						unitName: '待校核',
						rzrs: 16,
					},
					{
						unitName: '待校核',
						rzrs: 16,
					},
				],
				headerData2: [{
						width: 30,
						align: 'left',
						name: '议案名称',
						value: 'unitName',
						solt: 'unitName'
					},
					{
						width: 20,
						align: 'left',
						name: '操作',
						value: 'controls',
						solt: 'controls'
					},

				],
				tableData2: [{
						unitName: '张三领衔提出“关于增加养老福利的建议',
						controls: '查看详情'
					},
					{
						unitName: '张三领衔提出“关于增加养老福利的建议...张三领衔提出“关于增加养老福利的建议...',
						controls: '查看详情'
					},
				],
				headerData3: [{
						width: 30,
						align: 'center',
						name: '序号',
						value: 'index',
						solt: 'index'
					},
					{
						width: 20,
						align: 'center',
						name: '建议号',
						value: 'indext',
						solt: 'indext'
					},
					{
						width: 40,
						align: 'center',
						name: '标题',
						value: 'indexThree',
						solt: 'indexThree'

					},
					{
						width: 20,
						align: 'center',
						name: '状态',
						value: 'index4',
						solt: 'index4'
					},

				],
				tableData3: [{
						index: '01',
						indext: '20240810210',
						indexThree: '重点建议13224',
						index4: '已交办'
					},
					{
						index: '01',
						indext: '20240810210',
						indexThree: '重点建议13224',
						index4: '已交办'
					}, {
						index: '01',
						indext: '20240810210',
						indexThree: '重点885adssdsasaas',
						index4: '已交办'
					},
				],

				cardImgList: [{
						url: '/static/cd0537ec1.png',
						title: '议案数',
						number: 72,
						unit: '件'
					},
					{
						url: '/static/cd0537ec2.png',
						title: '建议数',
						number: 20,
						unit: '件'
					},
					{
						url: '/static/cd0537ec3.png',
						title: '供参考建议',
						number: 8,
						unit: '件'
					}
				],
				card4ImgList: [{
						url: '/static/ct35r2r.png',
						title: '已分办',
						number: 100,
						unit: '%',
						color: '#B74B13',
						unitColor: "#DA8254"
					},
					{
						url: '/static/ct35r1r.png',
						title: '已签收',
						number: 100,
						unit: '%',
						color: '#21B626',
						unitColor: "#21B626"
					},
					{
						url: '/static/ct35r3r.png',
						title: '已答复',
						number: 72,
						unit: '%',
						color: '#A57504',
						unitColor: "#A57504"
					},

					{
						url: '/static/ct35r4r.png',
						title: '已评价',
						number: 38,
						unit: '%',
						color: '#F17666',
						unitColor: " #F17666"
					}
				],
				// 词云图数据
				wordCloud: [{
						name: "城建环资类(75)",
						value: 75,
					},
					{
						name: "法制类(4)",
						value: 4,
					},
					{
						name: "其他类(4)",
						value: 4,
					},
					{
						name: "预算类(32)",
						value: 32,
					},
					{
						name: "农村农业类(2)",
						value: 2,
					},
					{
						name: "社会建设类(35)",
						value: 35,
					},
					{
						name: "监察司法类(75)",
						value: 75,
					},
					{
						name: "经济类(4)",
						value: 4,
					},
					{
						name: "预算类(35)",
						value: 35,
					},
					{
						name: "经济类(2)",
						value: 2,
					},
					{
						name: "教科文卫类(2)",
						value: 2,
					},
					{
						name: "体育类(4)",
						value: 4,
					},
					{
						name: "经济类(32)",
						value: 32,
					},
					{
						name: "经济类(55)",
						value: 55,
					},
					{
						name: "监察司法类(55)",
						value: 55,
					},
					{
						name: "城建环资类(75)",
						value: 75,
					},
					{
						name: "教课文卫类(92)",
						value: 92,
					},
					{
						name: "其他类(35)",
						value: 35,
					},
					{
						name: "侨务类(4)",
						value: 4,
					},
				],
				barStyle: {
					color: '#F22C1F',
					background: 'linear-gradient(311deg, #FF1010 0%, #FFD3D3 100%);'

				},
				barList: [{

					name: '法制',
					value: 66,
				}, {

					name: '监察司法',
					value: 56,
				}, {

					name: '预算',
					value: 47,
				}]
			}
		},
		onLoad() {

		},
		methods: {

		}
	}
</script>

<style scoped>
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		background: #F6F6F6;
	}

	.logo {
		height: 200rpx;
		width: 200rpx;
		margin-top: 200rpx;
		margin-left: auto;
		margin-right: auto;
		margin-bottom: 50rpx;
	}

	.text-area {
		display: flex;
		justify-content: center;
	}

	.title {
		font-size: 36rpx;
		color: #8f8f94;
	}

	.content-card-main {
		padding: 26rpx 32rpx 32rpx 28rpx;
	}

	.content-card-main .main_card {
		display: flex;
		flex-direction: row;
		justify-content: space-between;
	}

	.content-card-main .main_card_b {
		display: flex;
		flex-wrap: wrap;
	}

	.content-card-main .main_card .card {
		position: relative;
	}


	.content-card-main .main_card_b .card {
		flex: 0 0 auto;
		/* 或者根据需要设置具体的宽度 */
		position: relative;
	}

	.content-card-main .main_card .card .title {
		position: absolute;
		top: 26rpx;
		left: 28rpx;
		font-family: PingFang SC, PingFang SC;
		font-weight: 500;
		font-size: 24rpx;
		color: #7F7F7F;
		line-height: 28rpx;
		text-align: left;
		font-style: normal;
		text-transform: none;
	}

	.content-card-main .main_card .card .bottom {
		position: absolute;
		top: 72rpx;
		left: 28rpx;
		font-family: PingFang SC, PingFang SC;
		font-weight: 500;
		font-size: 24rpx;
		color: #7F7F7F;
		line-height: 28rpx;
		text-align: left;
		font-style: normal;
		text-transform: none;
	}

	.content-card-main .main_card .card .bottom text {
		font-family: PingFang SC, PingFang SC;
		font-weight: 500;
		font-size: 40rpx;
		color: #000000;
		line-height: 47rpx;
		text-align: left;
		font-style: normal;
		text-transform: none;
	}

	.content-card-main .main_card .card image {
		width: 204rpx;
		height: 148rpx;
	}

	.content-card-main .main_card_b .card image {
		width: 308rpx;
		height: 160rpx;
	}

	.content-card-main .main_banner {
		position: relative;
	}

	.content-card-main .main_banner image {
		margin-left: -12rpx;
		width: calc(100% + 20rpx);
		height: 161rpx;
	}

	.content-card-main .main_banner .number {
		position: absolute;
		font-family: DIN, DIN;
		top: 54rpx;
		right: 174rpx;
		font-weight: 500;
		font-size: 40rpx;
		color: #ffffff;
		line-height: 47rpx;
		text-align: left;
		font-style: normal;
		text-transform: none;
	}


	.font {
		font-family: PingFang SC, PingFang SC;
		font-weight: 500;
		font-size: 24rpx;
		font-style: normal;
		text-transform: none;
	}

	.unitName {
		width: 362rpx;
		color: #000000;
		overflow: hidden;
		text-overflow: ellipsis;
		/* 超出部分显示为省略号 */
		white-space: nowrap;
		/* 保持内容在一行显示，如果需要多行，可以移除这行 */
	}

	.statistics {
		width: 100rpx;
		color: #2A8BFD;
	}

	.controls {
		width: 100rpx;
		color: #2A8BFD;
	}

	.indexThree {
		width: 200rpx;
		overflow: hidden;
		text-overflow: ellipsis;
		/* 超出部分显示为省略号 */
		white-space: nowrap;
	}

	.index {
		width: 50rpx;

	}

	.indext {
		width: 100rpx;
		overflow: hidden;
		text-overflow: ellipsis;
		/* 超出部分显示为省略号 */
		white-space: nowrap;
	}

	.index4 {
		width: 100rpx;
	}

	.table_footer {
		margin-top: 26rpx;
		text-align: center;
		width: 100%;
		font-family: PingFang SC, PingFang SC;
		font-weight: 500;
		font-size: 24rpx;
		color: #2A8BFD;
		line-height: 28rpx;
		font-style: normal;
		text-transform: none;
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: center;
	}

	.triangle {
		margin-left: 6rpx;
		width: 0;
		height: 0;
		border-left: 9rpx solid transparent;
		/* 左侧透明 */
		border-right: 9rpx solid transparent;
		/* 右侧透明 */
		border-top: 12rpx solid #2A8BFD;
		/* 上侧为实心颜色 */
	}

	.wordCloud-warp_main {
		/* 	width: 652rpx;
		height: 384rpx; */
		background: #FFFFFF;
		border-radius: 8rpx 8rpx 8rpx 8rpx;
		border: 2rpx solid #E8E8E8;
	}
</style>